package com.常用类.作业;
import java.util.Scanner;
public class 字符串统计 {
    public static void main(String[] args) {
        f("Han Shun Ping");
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        f(str);
    }

    static void f(String str){
        int indexStart = str.indexOf(" ");
        int indexEnd = str.lastIndexOf(" ");
        if ((indexStart == -1 && indexEnd == -1) || (str == null)) {
            System.out.println("输入的格式不对");
            return;
        }
       String str1 = str.substring(0, indexStart);
       String str2 = str.substring(indexStart + 1, indexEnd);
       String str3 = str.substring(indexEnd + 1);

        System.out.println(str3+","+str1 + "."+Character.toUpperCase(str2.charAt(0)));




    }
}
